Computer graphics systems commonly are used for displaying graphical representations of objects on a two-dimensional display screen. Current computer graphics systems can provide highly detailed representations and are used in a variety of applications.
In typical computer graphics systems, an object to be represented on a display screen is broken down into a plurality of graphics primitives. Primitives are basic components of a graphics picture, such as points, lines, vectors and polygons (e.g., triangles). Typically, a hardware/software scheme is implemented to render (draw) on a two-dimensional display screen, the graphics primitives that comprise a view of one or more objects.
A host computer commonly provides primitive data that represents the primitives of a three-dimensional object to be rendered. When the primitive is a triangle, for example, the host computer may define the triangle in terms of the x, y, z coordinates and the red, green, blue (R,G,B) color values of each vertex. Rendering hardware interpolates the primitive data to compute the display screen pixels that constitute each primitive, and the R,G,B color values for each pixel.
The basic components of a typical computer graphics system include a geometry accelerator, a rasterizer and a frame buffer. The geometry accelerator receives, from the host computer, vertex coordinate and color data for primitives that constitute an object. The geometry accelerator typically performs transformations on the vertex coordinate data (i.e., to screen space coordinates), decomposes quadrilaterals into triangles, and may perform other functions, such as lighting, clipping and performing plane equation calculations for each primitive. The output from the geometry accelerator, referred to as rendering data, is used by the rasterizer to compute final screen space coordinates and R,G,B color values for each pixel constituting the primitives. The final data is stored in the frame buffer for display on a display screen. Some graphics systems are pipelined such that various operations (such as transformations, interpolation, etc.) are performed simultaneously by different components on different object primitives.
In computer graphics, it is often desirable to reduce the precision of data at some point in the graphics pipeline. This may be necessary for final storage as 8 bits in the frame buffer, for example, when a 24-bit color value consisting of 8 bits of red, 8 bits of green and 8 bits of blue is reduced to 3 bits of red, 3 bits and green and 2 bits of blue for storage as 8 bits in the frame buffer. The number of bits may also be reduced after high precision operations are performed. For example, after rasterization at high precision (such as 24-bit precision), extra bits may be thrown away to reduce the data to eight bits per channel for downstream operations.
Simple truncation and rounding are undesirable due to Mach banding effects that are introduced into the final image. In the Mach banding effect, the intensity change at any edge where there is a discontinuity in magnitude or slope of intensity is exaggerated by the human eye. Mach banding is described, for example, by Foley and van Dam in Computer Graphics, Principles and Practice, Second Edition, Addison-Wesley, 1990, pp.735-736. To avoid the Mach banding effect, some form of dithering is often used to exploit spatial integration in the eye. Dithering is described in the aforementioned Foley and van Dam reference at pages 568-573. In the dithering operation, a dither value from a dither matrix is combined with a data value prior to truncation. The dither value varies with pixel location in the image. A problem with dithering is "hot spots" introduced by the dither matrix. The hot spots are seen as regions of increased intensity in the output image. It is desirable to provide methods and apparatus for dithering wherein hot spots are reduced or eliminated.